﻿
#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__
#include <random>

#include "cocos2d.h"
#include "Block.h"
class AllBlock;

class SceneMain : public cocos2d::Scene
{
public:
	static cocos2d::Scene* createScene();

	virtual bool init() override;
	
	// a selector callback
	void menuCloseCallback(cocos2d::Ref* pSender);
	
	// implement the "static create()" method manually
	CREATE_FUNC(SceneMain);

	cocos2d::Size vsize;
	cocos2d::Layer* layerGame;
	std::random_device r;
	int lineCount;
	bool onTouch(cocos2d::Touch* t, cocos2d::Event* e);
	AllBlock allBlock;
private:

  void startGame();

  void addStartLine();

  void addNormalLine(int index);

  void moveDown();
};

#endif // __HELLOWORLD_SCENE_H__
